home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-24 | 6.7 KB | 158 lines | [TEXT/MPS ] |
- #------------------------------------------------------------------------------
- #
- # Apple Macintosh Developer Technical Support
- #
- # Program: CalcIt
- # File: CalcIt.make - Make Source
- #
- # Copyright © 1988-1992 Apple Computer, Inc.
- # All rights reserved.
- #
- #------------------------------------------------------------------------------
-
- AppName = 'CalcIt'
- Signature = 'CCIT'
-
- DTS.Lib.folder = "::DTS.Lib:"
- DTS.Lib.hdrs = "::DTS.Lib:DTS.Lib.headers:"
- projsrc = :
- obj = :OBJECT:
-
- #------------------------------------------------------------------------------
- # Options for our compilers:
- # -sym on: tells the compilers and linker to emit symbol information for
- # a source level debugger, such as SADE.
- # -i {DTS.Lib.hdrs}: means to look for any #include files in the specified
- # directory, as well as the normal set.
- # -r: tells the C compiler to require function prototypes.
- # -mbg off: tells the compilers to not emit low-level debugger names. This
- # saves on file space, but you may wish to remove this option if you
- # need to debug with something like Macsbug.
- # -rd: for Rez means to suppress warnings for redeclared types (we redeclare
- # 'RECT' because it’s not included in MPW 3.0).
- # -append: means to add the resources to the target file, rather than
- # deleting all the ones that are there first.
- # -d Signature...: is a way of passing our application's signature to Rez.
- # With this mechanism, we can define our signature here, and export
- # it to Rez, so that we don't have to declare it there, too.
- # -sn STDCLIB=Main: puts all the routines that would normally go into the
- # STDCLIB segment into the Main segment. This is done so that when we
- # call upon any low-level utilities, we don't potentially move memory
- # by loading in a segment.
- #------------------------------------------------------------------------------
-
- SymOptions = #-sym on # turn this on to debug with SADE
- IncludesFolders = -i {DTS.Lib.hdrs}
-
- COptions = {IncludesFolders} {SymOptions} -r -mbg on
- RezOptions = {IncludesFolders} -rd -append -d Signature="{Signature}" -d AppName={AppName}
- LinkOptions = {SymOptions} {SegmentMappings} -msg nodup -w
- SegmentMappings = -sn INTENV=Main ∂
- -sn STDCLIB=Main ∂
- -sn SANELIB=Main ∂
- -sn StringUtils=Main ∂
- -sn UtilMain=Main
-
- #------------------------------------------------------------------------------
- # These are modified default build rules. This is necessary to take into
- # account differences between MPW 3.1 and 3.2
- #------------------------------------------------------------------------------
- {obj} ƒ {projsrc}
-
- {obj}.p.o ƒ {projsrc}.p
- {Pascal} {POptions} {PAltOptions} {DepDir}{Default}.p -o {TargDir}{Default}.p.o
-
- {obj}.c.o ƒ {projsrc}.c
- {C} {COptions} {CAltOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
-
- #------------------------------------------------------------------------------
- # These are the objects that we want to link with. If any one of these
- # changes, then we invoke the Link command.
- #------------------------------------------------------------------------------
- AppObjects = ∂
- {obj}DoEvent.c.o ∂
- {obj}EventLoop.c.o ∂
- {obj}File.c.o ∂
- {obj}Help.c.o ∂
- {obj}IdleTasks.c.o ∂
- {obj}Menu.c.o ∂
- {obj}Start.c.o ∂
- {obj}TRootObj.c.o ∂
- {obj}Window.c.o ∂
- {obj}WindowDialog.c.o ∂
- {obj}WindowPalette.c.o
-
- CSysObjects = ∂
- {DTS.Lib.folder}DTS.Lib_controls ∂
- {DTS.Lib.folder}DTS.Lib_ctlhandler ∂
- {DTS.Lib.folder}DTS.Lib_framework ∂
- {DTS.Lib.folder}DTS.Lib_strings ∂
- {DTS.Lib.folder}DTS.Lib_treeobj ∂
- {DTS.Lib.folder}DTS.Lib_utils ∂
- "{Libraries}Runtime.o" ∂
- "{CLibraries}StdCLib.o" ∂
- "{Libraries}Interface.o"
-
- #------------------------------------------------------------------------------
- # Dependencies for the individual components. These will invoke the
- # default build rules listed in Chapter 9 of the MPW 3.0 manual.
- # You may wish to reduce the number of dependencies. Two dependencies
- # you may wish to remove are this makefile and the App.protos.h file.
- # For the App.protos.h file, if you add a function to the list of
- # functions in App.protos.h, you will cause all the source files to be
- # recompiled. This may be more than you want to wait for each time you
- # add a function to your application. On the other hand, if you do not
- # include this in the dependencies, and you change the parameters for a
- # function, and make the respective change to App.protos.h, any files
- # that reference that function will not be recompiled. If these files are
- # recompiled, the prototype checking will catch any cases where you did
- # not change the way the altered function was called. <<You choose>>
- #------------------------------------------------------------------------------
-
- {AppObjects} ƒ #{AppName}.make ∂
- # App.h ∂
- # App.protos.h ∂
- App.Common.h
-
- #------------------------------------------------------------------------------
- # This is a dummy dependency rule. This will always be executed. This dummy
- # rule must be the first for {AppName} so that it will be executed first.
- # This is necessary to make evaluations that are beyond the scope of
- # Make. These evaluations will be performed by the application at execution time,
- # and they must execute first because compile and link command lines depend
- # on variables set up by these evaluations. This has the unfortunate side
- # effect that Make will always consider {AppName} to be out of date. It will
- # always, at a minimum, execute the commands for the target ShellForce.
- #------------------------------------------------------------------------------
-
- {AppName} ƒƒ ShellForce
-
- # With the above rule, {AppName} will always be out of date with respect to
- # the non-existent file ShellForce. This will force the following commands to
- # be executed.
- ShellForce ƒ
- BEGIN
- IF "{ShellVersion}" == ""
- ( EVALUATE "`Version`" =~ /MPW Shell≈ ([0-9]+(.[ab0-9]+)+)®1≈/ ) ∑ Dev:Null
- SET ShellVersion "{®1}"
- END
- END ∑ Dev:Null # Output to bit bucket so we don’t see above calculations
-
- #------------------------------------------------------------------------------
- # Build rule that links our application together. If any of our objects
- # changes, or this makefile changes, then we relink. The dummy prerequisite
- # ShellForce must come before any other prerequisites for {AppName}
- #------------------------------------------------------------------------------
-
- {AppName} ƒƒ {AppObjects}
- Link {LinkOptions} -o {Targ} {AppObjects} {CSysObjects}
- SetFile {Targ} -t APPL -c {Signature} -a B
-
- #------------------------------------------------------------------------------
- # Build rule that creates our resources and adds them to the application
- #------------------------------------------------------------------------------
-
- {AppName} ƒƒ {AppName}.make ∂
- {AppName}.r
- Rez {RezOptions} {AppName}.r -o {Targ}
-